﻿@namespace BlazorComponent
@typeparam TValue
@typeparam TInput
@inherits ComponentPartBase<TInput>

@if (Clearable)
{
    RenderFragment? childContent;

    if (!IsDirty)
    {
        childContent = @<div></div>;
    }
    else
    {
        childContent = RenderPart(typeof(BInputIcon<,>), "clear-icon", ClearIcon, HandleOnClearClickAsync, arg0Name: "Type", arg1Name: "Icon", arg2Name: "OnClick");
    }

    @RenderPart(typeof(BInputSlot<,>), "append", "inner", childContent, arg0Name: "Type", "Location")
}
